<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
<?php 
if(isset($GLOBALS['title']))
{
	echo $GLOBALS['title'];
}
?>
</title>
<script src="style/js/jquery.js" type="text/javascript"></script>
<script src="style/js/main.js" type="text/javascript"></script>
<link href="style/css/index.css" rel="stylesheet" type="text/css" />
<link href="style/css/func.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="overtop">
<?php
if(!isset($_SESSION['reader']))
{
	echo '你好，请&nbsp;<a href="#" style="color:#CC3300" name="login">登录</a>&nbsp;';
	echo '或<a href="login.php?action=register" style="color:#CC3300">&nbsp;注册</a>&nbsp;';
}
else
{
	echo '你好： <font color="#0000FF">' . $_SESSION['reader'] . ' </font>，欢迎登录';
	echo ' <a href="book_borrow_back.php?c" target="_self">我的收藏 </a>|';
	echo ' <a href="book_borrow_back.php" target="_self">控制面板 </a> |&nbsp;';
	echo '<a href="index.php?action=logout" name="logout">退出系统</a>';
}
?>
</div>
<div class="logo"><img src="style/image/logo1.png" /></div>
<div class="nav">
  <div class="navgo"></div>
  <div class="menu">
  	<ul>
    <?php
		$menuclick = pathinfo($_SERVER['REQUEST_URI']);
	?>
    	<li><a href="index.php" target="_self" <?php echo $menuclick['basename'] == 'index.php' ? 'class="menuclick"' : ''; ?>>首页</a></li>
    	<li><a href="book_by_class.php" target="_self" <?php echo $menuclick['basename'] == 'book_by_class.php' ? 'class="menuclick"' : ''; ?>>图书分类</a></li>
    	<li><a href="book_borrow_back.php" target="_self" <?php echo $menuclick['basename'] == 'book_borrow_back.php' ? 'class="menuclick"' : ''; ?>>图书借还</a></li>
        <?php
		if($nav = $action->get_nav())
		{
			foreach($nav as $nn)
			{
				$class = "book_by_class.php?typeid=" . $nn['id'] == $menuclick['basename'] ? 'class="menuclick"' : '';
				echo "<li><a href='book_by_class.php?typeid=" . $nn['id'] . "' target='_self' $class>" . $nn['value'] . "</a></li>";
			}
		}
		?>
    </ul>
  </div>
</div>
<div class="loginbox">
<div class="img_close"><img name="close" src="style/image/close.gif" title="关闭" alt="关闭"/></div>
   <dl>
	<form action="" method="post">
        <dd>用户：<input class="textinput" type="text" name="readername" /></dd>
    	<dd>密码：<input class="passinput" type="password" name="readerpass" /></dd>
    	<dd><input type="submit" name="loginbox_sub" class="login_btn" value="登录" /></dd>
    </form>
   </dl>
</div>
<div class="undernav">
<div class="undernavtext">当前位置&gt;&gt;<?php echo isset($GLOBALS['pos']) ? $GLOBALS['pos'] : '';?></div>
</div>
